Optimal. Leaf size=100 \[ -\frac {(A-B) c \cos (e+f x)}{f (a+a \sin (e+f x))^{3/2} \sqrt {c-c \sin (e+f x)}}+\frac {B c \cos (e+f x) \log (1+\sin (e+f x))}{a f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.25, antiderivative size = 100, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 5, integrand size = 40, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.125, Rules used = {3050, 2816,
2746, 31, 2817} \begin {gather*} \frac {B c \cos (e+f x) \log (\sin (e+f x)+1)}{a f \sqrt {a \sin (e+f x)+a} \sqrt {c-c \sin (e+f x)}}-\frac {c (A-B) \cos (e+f x)}{f (a \sin (e+f x)+a)^{3/2} \sqrt {c-c \sin (e+f x)}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 31
Rule 2746
Rule 2816
Rule 2817
Rule 3050
Rubi steps
\begin {align*} \int \frac {(A+B \sin (e+f x)) \sqrt {c-c \sin (e+f x)}}{(a+a \sin (e+f x))^{3/2}} \, dx &=\frac {B \int \frac {\sqrt {c-c \sin (e+f x)}}{\sqrt {a+a \sin (e+f x)}} \, dx}{a}-(-A+B) \int \frac {\sqrt {c-c \sin (e+f x)}}{(a+a \sin (e+f x))^{3/2}} \, dx\\ &=-\frac {(A-B) c \cos (e+f x)}{f (a+a \sin (e+f x))^{3/2} \sqrt {c-c \sin (e+f x)}}+\frac {(B c \cos (e+f x)) \int \frac {\cos (e+f x)}{a+a \sin (e+f x)} \, dx}{\sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=-\frac {(A-B) c \cos (e+f x)}{f (a+a \sin (e+f x))^{3/2} \sqrt {c-c \sin (e+f x)}}+\frac {(B c \cos (e+f x)) \text {Subst}\left (\int \frac {1}{a+x} \, dx,x,a \sin (e+f x)\right )}{a f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ &=-\frac {(A-B) c \cos (e+f x)}{f (a+a \sin (e+f x))^{3/2} \sqrt {c-c \sin (e+f x)}}+\frac {B c \cos (e+f x) \log (1+\sin (e+f x))}{a f \sqrt {a+a \sin (e+f x)} \sqrt {c-c \sin (e+f x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains complex when optimal does not.
time = 0.81, size = 157, normalized size = 1.57 \begin {gather*} -\frac {\left (\cos \left (\frac {1}{2} (e+f x)\right )+\sin \left (\frac {1}{2} (e+f x)\right )\right ) \sqrt {c-c \sin (e+f x)} \left (A-B+B \log \left (e^{i (e+f x)}\right )-2 B \log \left (i+e^{i (e+f x)}\right )+B \left (\log \left (e^{i (e+f x)}\right )-2 \log \left (i+e^{i (e+f x)}\right )\right ) \sin (e+f x)\right )}{f \left (\cos \left (\frac {1}{2} (e+f x)\right )-\sin \left (\frac {1}{2} (e+f x)\right )\right ) (a (1+\sin (e+f x)))^{3/2}} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Leaf count of result is larger than twice the leaf count of optimal. \(412\) vs.
\(2(92)=184\).
time = 0.30, size = 413, normalized size = 4.13
method | result | size |
default | \(-\frac {\left (2 B \cos \left (f x +e \right ) \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+2 B \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right ) \left (\cos ^{2}\left (f x +e \right )\right )-B \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \sin \left (f x +e \right ) \cos \left (f x +e \right )-B \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \left (\cos ^{2}\left (f x +e \right )\right )+A \sin \left (f x +e \right ) \cos \left (f x +e \right )+A \left (\cos ^{2}\left (f x +e \right )\right )-4 B \sin \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+2 B \cos \left (f x +e \right ) \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )-B \sin \left (f x +e \right ) \cos \left (f x +e \right )+2 B \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right ) \sin \left (f x +e \right )-B \left (\cos ^{2}\left (f x +e \right )\right )-B \cos \left (f x +e \right ) \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-A \sin \left (f x +e \right )-4 B \ln \left (-\frac {-1+\cos \left (f x +e \right )-\sin \left (f x +e \right )}{\sin \left (f x +e \right )}\right )+B \sin \left (f x +e \right )+2 B \ln \left (\frac {2}{1+\cos \left (f x +e \right )}\right )-A +B \right ) \sqrt {-c \left (\sin \left (f x +e \right )-1\right )}}{f \left (-1+\cos \left (f x +e \right )+\sin \left (f x +e \right )\right ) \left (a \left (1+\sin \left (f x +e \right )\right )\right )^{\frac {3}{2}}}\) | \(413\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {\sqrt {- c \left (\sin {\left (e + f x \right )} - 1\right )} \left (A + B \sin {\left (e + f x \right )}\right )}{\left (a \left (\sin {\left (e + f x \right )} + 1\right )\right )^{\frac {3}{2}}}\, dx \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A]
time = 0.52, size = 120, normalized size = 1.20 \begin {gather*} -\frac {{\left (4 \, B \sqrt {a} \log \left ({\left | \cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right ) \right |}\right ) \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) - \frac {A \sqrt {a} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right ) - B \sqrt {a} \mathrm {sgn}\left (\sin \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )}{\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )^{2}}\right )} \sqrt {c}}{2 \, a^{2} f \mathrm {sgn}\left (\cos \left (-\frac {1}{4} \, \pi + \frac {1}{2} \, f x + \frac {1}{2} \, e\right )\right )} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int \frac {\left (A+B\,\sin \left (e+f\,x\right )\right )\,\sqrt {c-c\,\sin \left (e+f\,x\right )}}{{\left (a+a\,\sin \left (e+f\,x\right )\right )}^{3/2}} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________